import request from '@/utils/request';

export const loginAPI = data => {
    return request({
        url: '/user',
        method: 'post',
        data
    });
};

export const gcpAPI = () => {
    return request({
        url: '/gcp',
        method: 'get'
    });
};

export const getPersonnelAPI = () => {
    return request({
        url: '/personnel',
        method: 'get'
    });
};

export const getTabAPI = () => {
    return request({
        url: '/tab',
        method: 'get'
    });
};
// 前端接口
// 专家的科室分类（专业科室列表）
export const getexpertAPI = () => {
    return request({
        url: '/api/LcywsyJcxx/GCP_GetZYKS',
        method: 'get'
    });
};
// 临床试验药物基本信息
export const getBaseAPI = params => {
    return request({
        url: '/api/LcywsyXmgl/GCP_GetLcywsyKsList',
        method: 'get',
        params
    });
};
// 临床试验科室列表
export const getHomeExpertAPI = () => {
    return request({
        url: '/api/LcywsyJcxx/GCP_GetLcsyzyks',
        method: 'get'
    });
};
// 科室详情
export const getExpertDeatilAPI = params => {
    return request({
        url: `/api/LcywsyJcxx/GCP_GetLcsyzyksDetails?zdbm=${params.zdbm}`,
        method: 'get',
        params
    });
};
// 专家介绍（医生列表）
export const getexpertdorAPI = ksbm => {
    return request({
        url: `/api/LcywsyJcxx/GCP_GetKSYS?ksbm=${ksbm.ksbm}`,
        method: 'get',
        ksbm
    });
};
// 受试者招募
export const getSubjectAPI = params => {
    return request({
        url: '/api/LcywsyXmgl/GCP_SSZZM_getList',
        method: 'get',
        params
    });
};
// 受试者招募详情
export const getSubjectDetailAPI = id => {
    return request({
        url: `/api/LcywsyXmgl/GCP_Sszzm_Details?wyid=${id.wyid}&ip=${id.ip}`,
        method: 'get',
        id
    });
};
// 首页用户注册情况
export const getRegisterAPI = () => {
    return request({
        url: '/api/LcywsyXmgl/GCP_GetReport_Regist',
        method: 'get'
    });
};
// 首页用户申请情况
export const getApplyAPI = () => {
    return request({
        url: '/api/LcywsyXmgl/GCP_GetReport_Project',
        method: 'get'
    });
};
// 成果数据
export const getAchievementsAPI = () => {
    return request({
        url: '/api/LcywsyXmgl/GCP_GetReport_Index',
        method: 'get'
    });
};
// 医院信息
export const getYYXXAPI = params => {
    return request({
        url: '/api/LcywsyXmgl/GCP_GetYYList',
        method: 'get',
        params
    });
};
